package com.zx.mes.test.hyl.model.factory;

/**
 * 引入反射，防止工厂类的无限增加
 * @author hyl
 * @date 2018-3-28
 */
public class CarInstance{

    private CarInstance(){}

    public static <T> T getInstance(Class<T> clazz) throws IllegalAccessException, InstantiationException {
        return clazz.newInstance();
    }
}
